package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.ProductBannerExample.E_BANNER;
import static org.jsola.hr.example.ProductBannerExample.E_PRODUCT_ID;
import static org.jsola.hr.example.ProductBannerExample.M_BANNER_MAX;
import static org.jsola.hr.example.ProductBannerExample.M_BANNER_NOT_NULL;
import static org.jsola.hr.example.ProductBannerExample.M_PRODUCT_ID_MAX;
import static org.jsola.hr.example.ProductBannerExample.M_PRODUCT_ID_NOT_NULL;
import static org.jsola.hr.example.ProductBannerExample.N_BANNER;
import static org.jsola.hr.example.ProductBannerExample.N_PRODUCT_ID;

/**
 * 产品banner
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【产品banner】的参数")
@Data
public class ProductBannerAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_PRODUCT_ID, example = E_PRODUCT_ID, required = true)
    @NotNull(message = M_PRODUCT_ID_NOT_NULL)
    @Length(max = 32, message = M_PRODUCT_ID_MAX)
    private String productId;

    @ApiModelProperty(notes = N_BANNER, example = E_BANNER, required = true)
    @NotNull(message = M_BANNER_NOT_NULL)
    @Length(max = 500, message = M_BANNER_MAX)
    private String banner;


}

